package com.ruyuan.payment.system.controller.admin;

import com.ruyuan.payment.server.req.AccountLogQueryReq;
import com.ruyuan.payment.server.resp.AccountLogQueryResp;
import com.ruyuan.payment.server.resp.CommonResp;
import com.ruyuan.payment.server.resp.PageResp;
import com.ruyuan.payment.server.service.AccountLogService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
@RequestMapping("/admin/account-log")
public class AdminAccountLogController {

    @Resource
    private AccountLogService accountLogService;

    @GetMapping("/query-list")
    public CommonResp queryList(@Valid AccountLogQueryReq req) {
        CommonResp<PageResp<AccountLogQueryResp>> commonResp = new CommonResp<>();
        PageResp<AccountLogQueryResp> list = accountLogService.queryList(req);
        commonResp.setContent(list);
        return commonResp;
    }
}
